import App from "./App";

// #ifndef VUE3
import Vue from "vue";
import uView from "@/uni_modules/uview-ui";
// import "./wxcomponents/vant/dist/common/index.wxss";
import {
  // baseURL,
  baseImgUrl,
  timeout,
  clientId,
  clientSecret,
  config,
} from "./config.js";
import store from "./store/store";

Vue.use(uView);
Vue.config.productionTip = false;
// Vue.prototype.$baseURL = baseURL;
Vue.prototype.$baseImgUrl = baseImgUrl;
Vue.prototype.$timeout = timeout;
Vue.prototype.$clientId = clientId;
Vue.prototype.$clientSecret = clientSecret;
const role = uni.getStorageSync('role');
Vue.prototype.$store = store



if (role) {
  config.role = role
};


App.mpType = "app";
const app = new Vue({
  store,
  ...App,
});


app.$mount();
// #endif

// #ifdef VUE3
import {
  createSSRApp
} from "vue";
export function createApp() {
  const app = createSSRApp(App);
  return {
    app,
  };
}
// #endif